#ifndef _Ammo_H
#define _Ammo_H

#include <iostream>
#include <vector>
#include <list>

#include "objects.h"

#include "particle_factory.h"


//Define ammo Base Types
enum Ammo_Type
{
	AT_NONE,
	AT_BULLETS,
	AT_MISSLES,
	AT_NADES,
	AT_SLUGS,
};


//State of the Bullets
enum Ammo_State
{
	AS_NONE,
	AS_ACTIVE,
	AS_DEAD
};




/* The Actuall Projectile Class */
class Projectile : public Objects
{
	public:

		Projectile()
		{
			r = 255; 
			g = 0; 
			b = 0; 
			alpha = 255; 
		}

		
//	float alpha;
	float r, g, b, alpha;

		//Get/Set Damage
		float Get_Damage() { return damage; }
		void Set_Damage(float new_damage) { damage = new_damage; }

		//Get random cool speed
		void Set_Speed(float min, float max);




	protected:

		//Shooting Properties
		float damage;
		
		float min_speed, max_speed;

};




/* Ammunition FactoryZ!!! */
class Ammo_Factory : public Particle_Factory
{
	public:
		//Load all folders for Ammo
	//	static bool Load(std::string cfg_location);

		//Update Bullet positions
		 void Mechanics_Update();

		 void Update_Logic();
		
		//Draw Bullets
	//	static void Draw();


		
		//use an image
		bool Use_Image() { return use_image; }



		//Get/Set Damage
		float Get_Damage() { return damage; }
		void Set_Damage(float new_damage) { damage = new_damage; }
	
		

		void Set_Projectile(Projectile& p);
	

		//THE LIST
	//	static std::vector< std::string > List;

		//particle properies of the bullets
		//Particle_Properties particle_prop;


		//Minimum/MAximum speed
		float min_speed, max_speed;


	protected:

		//Get list of ammo folders to load
		//static bool Get_AmmoList();
		//get individual Ammo Properties
	//	bool  Get_Config(std::string folder_name);

		

		//Are we using an image for the ammo?
		bool use_image;

		//Shooting Properties
		float damage;

};




//array of bullets (actual bullets)
//extern Projectile bullets[21]; Old Crappy arrays'
extern std::list< Projectile > bullet_list; //new sweet vectors

//All of the Ammo types in an Array
extern std::vector< Ammo_Factory > Ammo_Types;


extern  Ammo_Factory Bullets;


#endif